package org.example.kg_back.controller;


import org.example.kg_back.common.result.Result;
import org.example.kg_back.service.imp.AtcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/api/atc")
public class AtcController {

	@Autowired
	private AtcService service;
	/**
	 * 获取各扇区航班数
	 * @return
	 */
	@GetMapping("/findSectorSortie")
	public Result<?> findSectorSortie(){
		return Result.success(service.findSectorSortie());
	}

	/**
	 * 根据扇区名称获取该扇区航班数
	 * @param planSectorName
	 * @return
	 */
	@GetMapping("/findLocusCount")
	public Result<?> findLocusCount(@RequestParam String planSectorName){
		return Result.success(service.findLocusCount(planSectorName)) ;
	}

	/**
	 * 扇区架次数动态统计(饼状图)
	 * @return
	 */
	@GetMapping("/findATCTime")
	public Result<?> findATCTime(){
		return Result.success(service.findATCTime()) ;
	}


}
